const { override, fixBabelImports, addWebpackAlias } = require('customize-cra');
const path = require('path');
const devMode = process.env.NODE_ENV !== 'production'
module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd',
        libraryDirectory: 'es',
        style: 'css',
    }),
    addWebpackAlias({
        'react-dom': devMode ? '@hot-loader/react-dom' : 'react-dom', // react-hot-loader需要
    })
);